package routerGroup

import (
	"github.com/gin-gonic/gin"
	"hr-system/Controller"
	"hr-system/Mapper"
	"hr-system/Middleware"
)

func CollectRoute(r *gin.Engine) *gin.Engine { //管理路由
	r.Use(Middleware.CORSMiddleware())    //解决跨域
	r.POST("/AdminLogin", Controller.Login)                            //主页登录
	//r.GET("/api/auth/info", middleware.AuthMiddleware(), controller.Info) // 获取用户信息
	Mapper.DepartmentManageGroup(r)
	Mapper.PostManageGroup(r)
	Mapper.NewEmployeeGroup(r)
	Mapper.ProbationEmployeeGroup(r)
	Mapper.DepartmentTransferGroup(r)
	Mapper.PostTransferGroup(r)
	Mapper.ResignEmployeeGroup(r)
	Mapper.OtherInformationGroup(r)
	Mapper.ReportManageGroup(r)
	return r
}
